#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#define ll long long
#define getchar() (p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++)
using namespace std;
const int N = 3e5+5;
int a[N],n,tim,x,A,B,ans = N;
int hd[N],cnt;
struct node{int to,nex;}e[N << 1];
inline void add(int u,int v)
{e[++cnt] = {v,hd[u]};hd[u] = cnt;}
void dfs(int u,int fa)
{
    a[++tim] = u;
    for(int i = hd[u],v;i;i = e[i].nex)
        if((v = e[i].to) != fa)dfs(v,u);
}
char buf[1<<21],*p1,*p2;
inline int rd()
{
    char c;int f = 1;
    while(!isdigit(c = getchar()))if(c=='-')f = -1;
    int x = c-'0';
    while(isdigit(c = getchar()))x = x*10+(c^48);
    return x*f;
}
int main()
{
    freopen("nim.in","r",stdin);
    freopen("nim.out","w",stdout);
    n = rd();x = rd();A = rd();B = rd();
    if(A <= B)return puts("1"),0;
    // for(int i = 1;i < n;i++)
    // {int u = rd(),v = rd();add(u,v);add(v,u);}
    // dfs(x,0);
    
    return 0;
}